package org.java;

public class DoLong {
	public static long enVLong(long i) {
		if (i < 0) {
			return ((-1 * i) << 1) ^ 1;

		} else {
			return i << 1;
		}
	}

	public static long unVLong(long i) {
		long lastbit = i & 1;
		long rtn = i >>> 1;
		if (lastbit > 0) {
			rtn *= -1;
		}
		return rtn;
	}

	public static int enVInt(int i) {
		if (i < 0) {
			return ((-1 * i) << 1) ^ 1;

		} else {
			return i << 1;
		}
	}

	public static int unVInt(int i) {
		int lastbit = i & 1;
		int rtn = i >>> 1;
		if (lastbit > 0) {
			rtn *= -1;
		}
		return rtn;
	}

	public static void main(String[] args) {
		System.out.println(enVLong(Long.MAX_VALUE + 1));
	}
}
